e909eb589ba2266edbc29093c0f5a152765abb76,src/main/java/org/eclipselabs/garbagecat/domain/jdk/G1MixedPauseEvent.java,G1MixedPauseEvent,G1MixedPauseEvent,#String#,144
Before Change
Matcher matcher = pattern.matcher(logEntry);
if (matcher.find()) {
timestamp = JdkMath.convertSecsToMillis(matcher.group(1)).longValue();
combined = JdkMath.calcKilobytes(Integer.parseInt(matcher.group(2)), matcher.group(3).charAt(0));
combinedEnd = JdkMath.calcKilobytes(Integer.parseInt(matcher.group(4)), matcher.group(5).charAt(0));
combinedAvailable = JdkMath.calcKilobytes(Integer.parseInt(matcher.group(6)),
matcher.group(7).charAt(0));
duration = JdkMath.convertSecsToMillis(matcher.group(8)).intValue();
}
} else if (logEntry.matches(REGEX_PREPROCESSED)) {
// preprocessed format
After Change
if (logEntry.matches(REGEX)) {
// standard format
Pattern pattern = Pattern.compile(REGEX);
Matcher matcher = pattern.matcher(logEntry);
if (matcher.find()) {
timestamp = JdkMath.convertSecsToMillis(matcher.group(1)).longValue();
combined = JdkMath.calcKilobytes(Integer.parseInt(matcher.group(2)), matcher.group(4).charAt(0));
combinedEnd = JdkMath.calcKilobytes(Integer.parseInt(matcher.group(5)), matcher.group(7).charAt(0));
combinedAvailable = JdkMath.calcKilobytes(Integer.parseInt(matcher.group(8)),
matcher.group(10).charAt(0));
duration = JdkMath.convertSecsToMillis(matcher.group(11)).intValue();
}
} else if (logEntry.matches(REGEX_PREPROCESSED)) {
// preprocessed format